/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-08-17 10:24:04
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-08-17 11:35:08
 * @FilePath: \施航4阶段react\src\pages\InputComponents.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 下拉框组件  用法，引入文件，标签形式
import { Select } from 'antd';
import Item from 'antd/lib/list/Item';
const InputComponents = (props) => {
    const { Option } = Select;
    const handleChange = (value) => {
        props.passData(`${value}`)
    }
    const OptionList = props.InputValue.map(item => <Option value={item.value} key={item.id}>{Item.value}</Option>
    )

    return (
        <>
            <Select placeholder={props.placeholder} style={{ width: 250 }} onChange={handleChange}>
                {OptionList}
            </Select>
        </>
    )
}
export default InputComponents;

